package com.mayp.supermarket.sales.variety;

import com.mayp.supermarket.sales.policy.Fruit;

/**
 * @Description :草莓
 * @Author : mayp
 * @Date: 2024/7/12  11:12
 */
public class Strawberry extends Fruit {
    // 草莓的价格
    public static final double STRAWBERRY_PRICE_PER_JIN = 13.0;
    // 折扣
    private static final double DISCOUNT = 0.8;

    public Strawberry(int weight) {
        super(STRAWBERRY_PRICE_PER_JIN, weight);
    }

    @Override
    public double calculateTotalPrice() {
        return pricePerJin * weight * DISCOUNT;
    }
}
